home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / devs / postscript_init.ps < prev    next >
Text File  |  1996-05-20  |  5KB  |  182 lines

  1. %!PS
  2. %%
  3. %%Title: PostPrt PostScript Printer Driver for the Amiga
  4. %%
  5. %%Author: Chris Nicotra, Integrated Systems, Inc.
  6. %%
  7. %%BeginProlog
  8.  
  9. %---------
  10. % Device Specific routines
  11. %---------
  12.  
  13. % Paper Trays
  14. /letter {} def
  15. /legal  {} def
  16. /a4 {} def
  17. /custom {} def
  18.  
  19. % Manual Paper Feed
  20. /manual {} def
  21.  
  22. % Graphic Screen Types
  23. /line_scr  { {pop} setscreen } def
  24. /dot_scr   { 20 currentscreen 4 -2 roll pop 3 1 roll setscreen } bind def
  25. /vert_scr  { 40  0 line_scr } def
  26. /horiz_scr { 40 90 line_scr } def
  27. /diag_scr  { 40 45 line_scr } def
  28.  
  29. %---------
  30. % General functions
  31. %---------
  32.  
  33. % underline show string
  34. /U
  35. {
  36.     gsave 0 -3 rmoveto
  37.     dup stringwidth pop
  38.     dup 0 rlineto neg 0 rlineto stroke
  39.     grestore
  40. } bind def
  41.  
  42. % Backspace a string
  43. /BS { stringwidth pop neg 0 rmoveto } bind def
  44.  
  45. % Shadow show string
  46. /SS
  47. {
  48.     dup
  49.     gsave false charpath .5 setlinewidth stroke grestore
  50.     stringwidth pop 0 rmoveto
  51. } bind def
  52.  
  53. % Show
  54. /S {show} bind def
  55.  
  56. % Move
  57. /M {moveto} bind def
  58.  
  59. /YM {currentpoint pop exch moveto} bind def
  60.  
  61. %% Define the ReEncoding Procudure
  62. /reencodedict 5 dict def
  63. /ReEncode
  64. {
  65.     reencodedict begin
  66.     /newencoding exch def
  67.     /newfontname exch def
  68.     /basefontname exch def
  69.  
  70.     /basefontdict basefontname findfont def
  71.  
  72.     /newfont basefontdict maxlength dict def
  73.  
  74.     basefontdict
  75.     { exch dup dup /FID ne exch /Encoding ne and
  76.         { exch newfont 3 1 roll put }
  77.         { pop pop }
  78.         ifelse
  79.     } forall
  80.     newfont /FontName newfontname put
  81.     newfont /Encoding newencoding put
  82.     newfontname newfont definefont pop
  83.     end
  84. } def
  85.  
  86. %% Define the ISO encoding Vector
  87. /ISO
  88. [
  89.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  90.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  91.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  92.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  93.  /space /exclam /quotedbl /numbersign /dollar /percent /ampersand
  94.  /quoteright /parenleft /parenright /asterisk /plus /comma /minus /period
  95.  /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon
  96.  /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H
  97.  /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft
  98.  /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
  99.  /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z
  100.  /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
  101.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  102.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /dotlessi /grave
  103.  /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef
  104.  /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown
  105.  /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
  106.  /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron
  107.  /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph
  108.  /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright
  109.  /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute
  110.  /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute
  111.  /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth
  112.  /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
  113.  /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn
  114.  /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae
  115.  /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute
  116.  /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex
  117.  /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex
  118.  /udieresis /yacute /thorn /ydieresis
  119. ] def
  120.  
  121. /FC {ISO ReEncode findfont exch dup 0.8 mul exch matrix scale makefont} bind def
  122.  
  123. /FE {ISO ReEncode findfont exch dup 1.2 mul exch matrix scale makefont} bind def
  124.  
  125. /FN {ISO ReEncode findfont exch scalefont} bind def
  126.  
  127. /L 0 def
  128. /T {dup dup currentpoint pop L sub dup dup cvi sub 3 1 roll cvi exch mod add
  129. sub 0 rmoveto} bind def
  130.  
  131.  
  132. %---------------
  133. % Routines used for doing bitmap graphics
  134. %---------------
  135. /s1 1 string def
  136. /gsh {currentfile s1 readhexstring pop 0 get} bind def
  137.  
  138. /rep
  139. {
  140.     /d exch def exch dup 3 1 roll add
  141.     dup 3 1 roll
  142.     1 sub 1 exch
  143.     {
  144.         picstr exch d put
  145.     } for
  146. } bind def
  147.  
  148. /run
  149. {
  150.     dup string /tmp exch def
  151.     currentfile tmp readhexstring pop pop
  152.     exch dup 3 1 roll add exch picstr exch tmp putinterval
  153. } bind def
  154.  
  155. /runlen
  156. {
  157.     picstr length
  158.     0
  159.     {
  160.         2 copy eq {pop pop exit} if
  161.         gsh
  162.         dup 0 eq {pop gsh gsh rep} {run} ifelse
  163.     } loop
  164. } bind def
  165.  
  166. /getcstr
  167. {
  168.     gsh
  169.     1 eq {runlen picstr} {currentfile picstr readhexstring pop} ifelse
  170. } bind def
  171.  
  172. /getcstr_r {picstr_r 0 getcstr putinterval} bind def
  173. /getcstr_g {picstr_g 0 getcstr putinterval} bind def
  174. /getcstr_b {picstr_b 0 getcstr putinterval} bind def
  175.  
  176. /getstr   {currentfile picstr   readhexstring pop} bind def
  177. /getstr_r {currentfile picstr_r readhexstring pop} bind def
  178. /getstr_g {currentfile picstr_g readhexstring pop} bind def
  179. /getstr_b {currentfile picstr_b readhexstring pop} bind def
  180.  
  181. %%EndProlog
  182.